package com.yanghang.controller;

import com.yanghang.entity.Company;
import com.yanghang.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CompanyController {
    @Autowired
    private CompanyService cs;

    @GetMapping("/company")
    public List<Company>selectAllCompany(){
        return cs.selectAllCompanyInformations();
    }
}
